package com.jshoperxms.entity;

import javax.persistence.*;

/**
 * Created by sdywcd on 2018/9/30.
 * Des:
 */
@Entity
@Table(name = "member_grade_t", schema = "jshoperxms", catalog = "")
public class MemberGradeT {
    private String id;
    private String type;
    private String name;
    private double start;
    private double end;
    private double increment;
    private double multiplypower;
    private String mpstate;
    private double mpchangepower;
    private long updatetime;
    private int versiont;
    private double discount;
    private long createtime;
    private String creatorid;
    private String status;
    private int levelname;

    @Id
    @Column(name = "ID", nullable = false, length = 25)
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "TYPE", nullable = false, length = 1)
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Basic
    @Column(name = "NAME", nullable = false, length = 45)
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "START", nullable = false, precision = 2)
    public double getStart() {
        return start;
    }

    public void setStart(double start) {
        this.start = start;
    }

    @Basic
    @Column(name = "END", nullable = false, precision = 2)
    public double getEnd() {
        return end;
    }

    public void setEnd(double end) {
        this.end = end;
    }

    @Basic
    @Column(name = "INCREMENT", nullable = false, precision = 2)
    public double getIncrement() {
        return increment;
    }

    public void setIncrement(double increment) {
        this.increment = increment;
    }

    @Basic
    @Column(name = "MULTIPLYPOWER", nullable = false, precision = 2)
    public double getMultiplypower() {
        return multiplypower;
    }

    public void setMultiplypower(double multiplypower) {
        this.multiplypower = multiplypower;
    }

    @Basic
    @Column(name = "MPSTATE", nullable = false, length = 1)
    public String getMpstate() {
        return mpstate;
    }

    public void setMpstate(String mpstate) {
        this.mpstate = mpstate;
    }

    @Basic
    @Column(name = "MPCHANGEPOWER", nullable = false, precision = 2)
    public double getMpchangepower() {
        return mpchangepower;
    }

    public void setMpchangepower(double mpchangepower) {
        this.mpchangepower = mpchangepower;
    }

    @Basic
    @Column(name = "UPDATETIME", nullable = false)
    public long getUpdatetime() {
        return updatetime;
    }

    public void setUpdatetime(long updatetime) {
        this.updatetime = updatetime;
    }

    @Basic
    @Column(name = "VERSIONT", nullable = false)
    public int getVersiont() {
        return versiont;
    }

    public void setVersiont(int versiont) {
        this.versiont = versiont;
    }

    @Basic
    @Column(name = "DISCOUNT", nullable = false, precision = 2)
    public double getDiscount() {
        return discount;
    }

    public void setDiscount(double discount) {
        this.discount = discount;
    }

    @Basic
    @Column(name = "CREATETIME", nullable = false)
    public long getCreatetime() {
        return createtime;
    }

    public void setCreatetime(long createtime) {
        this.createtime = createtime;
    }

    @Basic
    @Column(name = "CREATORID", nullable = false, length = 20)
    public String getCreatorid() {
        return creatorid;
    }

    public void setCreatorid(String creatorid) {
        this.creatorid = creatorid;
    }

    @Basic
    @Column(name = "STATUS", nullable = false, length = 1)
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        MemberGradeT that = (MemberGradeT) o;

        if (Double.compare(that.start, start) != 0) return false;
        if (Double.compare(that.end, end) != 0) return false;
        if (Double.compare(that.increment, increment) != 0) return false;
        if (Double.compare(that.multiplypower, multiplypower) != 0) return false;
        if (Double.compare(that.mpchangepower, mpchangepower) != 0) return false;
        if (updatetime != that.updatetime) return false;
        if (versiont != that.versiont) return false;
        if (Double.compare(that.discount, discount) != 0) return false;
        if (createtime != that.createtime) return false;
        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (type != null ? !type.equals(that.type) : that.type != null) return false;
        if (name != null ? !name.equals(that.name) : that.name != null) return false;
        if (mpstate != null ? !mpstate.equals(that.mpstate) : that.mpstate != null) return false;
        if (creatorid != null ? !creatorid.equals(that.creatorid) : that.creatorid != null) return false;
        if (status != null ? !status.equals(that.status) : that.status != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result;
        long temp;
        result = id != null ? id.hashCode() : 0;
        result = 31 * result + (type != null ? type.hashCode() : 0);
        result = 31 * result + (name != null ? name.hashCode() : 0);
        temp = Double.doubleToLongBits(start);
        result = 31 * result + (int) (temp ^ (temp >>> 32));
        temp = Double.doubleToLongBits(end);
        result = 31 * result + (int) (temp ^ (temp >>> 32));
        temp = Double.doubleToLongBits(increment);
        result = 31 * result + (int) (temp ^ (temp >>> 32));
        temp = Double.doubleToLongBits(multiplypower);
        result = 31 * result + (int) (temp ^ (temp >>> 32));
        result = 31 * result + (mpstate != null ? mpstate.hashCode() : 0);
        temp = Double.doubleToLongBits(mpchangepower);
        result = 31 * result + (int) (temp ^ (temp >>> 32));
        result = 31 * result + (int) (updatetime ^ (updatetime >>> 32));
        result = 31 * result + versiont;
        temp = Double.doubleToLongBits(discount);
        result = 31 * result + (int) (temp ^ (temp >>> 32));
        result = 31 * result + (int) (createtime ^ (createtime >>> 32));
        result = 31 * result + (creatorid != null ? creatorid.hashCode() : 0);
        result = 31 * result + (status != null ? status.hashCode() : 0);
        return result;
    }

    @Basic
    @Column(name = "LEVELNAME", nullable = false)
    public int getLevelname() {
        return levelname;
    }

    public void setLevelname(int levelname) {
        this.levelname = levelname;
    }
}
